package com.neuedu.helloworld.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@PropertySource(value= "classpath:jdbc.properties")
@RequestMapping("/other")
public class OtherController {

    @Value("${jdbc.url}")
    private String url;

    @Value("${jdbc.username}")
    private String username;

    @Value("${jdbc.password}")
    private String password;



    @RequestMapping("/info")
    public String info(){
        return String.format("读取其他配置文件,url : %s, username %s  ,  password : %s  ",url,username, password);
    }



}
